<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class ModifyContentTypeInMessageTable extends AbstractMigration
{
    public function up()
    {
        $this->table('message')
            ->changeColumn('content_type', 'enum', [
                'values' => 'text, notice, file, audio, image, card_message, system_hint, link, reply, rich_text, urge, forward',
                'default' => 'text',
                'comment' => '消息类型'
            ])->save();
    }

    public function down()
    {
        $this->table('message')->changeColumn('content_type', 'enum',[
            'values' => 'text, notice, file, audio, image, card_message, system_hint, link, reply',
            'default' => 'text',
            'comment' => '消息类型'
        ])->save();
    }
}
